/*
 Navicat Premium Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50724
 Source Host           : localhost
 Source Database       : tjwx

 Target Server Type    : MySQL
 Target Server Version : 50724
 File Encoding         : utf-8

 Date: 08/04/2019 16:48:03 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `classify`
-- ----------------------------
DROP TABLE IF EXISTS `classify`;
CREATE TABLE `classify` (
  `classifyid` varchar(50) NOT NULL COMMENT '类别id',
  `classifyname` varchar(20) NOT NULL COMMENT '分类名称',
  `desc` varchar(100) DEFAULT NULL COMMENT '说明',
  `state` int(1) DEFAULT '1' COMMENT '状态',
  `layer` int(5) DEFAULT NULL COMMENT '层级',
  `sequence` int(10) DEFAULT NULL COMMENT '次序',
  `parentid` varchar(50) DEFAULT NULL COMMENT '父级id',
  `createtime` varchar(20) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`classifyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `classify`
-- ----------------------------
BEGIN;
INSERT INTO `classify` VALUES ('1', '抽象', null, '1', '1', '1', null, '2019-08-03 15:00:00'), ('10', '家庭', null, '1', '1', '10', null, '2019-08-03 15:00:00'), ('11', '信息科技和通讯', null, '1', '1', '11', null, '2019-08-03 15:00:00'), ('12', '科学技术', null, '1', '1', '12', null, '2019-08-03 15:00:00'), ('2', '动物', null, '1', '1', '2', null, '2019-08-03 15:00:00'), ('3', '庆祝', null, '1', '1', '3', null, '2019-08-03 15:00:00'), ('4', '景观和自然', null, '1', '1', '4', null, '2019-08-03 15:00:00'), ('5', '卫星', null, '1', '1', '5', null, '2019-08-03 15:00:00'), ('6', '商业', null, '1', '1', '6', null, '2019-08-03 15:00:00'), ('7', '时尚', null, '1', '1', '7', null, '2019-08-03 15:00:00'), ('8', '概念', null, '1', '1', '8', null, '2019-08-03 15:00:00'), ('9', '教育', null, '1', '1', '9', null, '2019-08-03 15:00:00');
COMMIT;

-- ----------------------------
--  Table structure for `medium`
-- ----------------------------
DROP TABLE IF EXISTS `medium`;
CREATE TABLE `medium` (
  `mediumid` varchar(50) NOT NULL COMMENT '图片id',
  `url` varchar(100) DEFAULT NULL COMMENT '图片url',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `desc` varchar(100) DEFAULT NULL COMMENT '说明',
  `createtime` varchar(20) DEFAULT NULL COMMENT '创建时间',
  `state` int(1) DEFAULT '1' COMMENT '状态',
  `createuserid` varchar(50) DEFAULT NULL COMMENT '创建人id',
  `type` varchar(10) DEFAULT NULL COMMENT '媒体类别：分别为img、audio、video',
  PRIMARY KEY (`mediumid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `medium`
-- ----------------------------
BEGIN;
INSERT INTO `medium` VALUES ('1', 'http://localhost:8080/img/login.jpg', 'login.jpg', null, '2019-08-04 13:42:00', '1', '1', 'pic'), ('2', 'http://localhost:8080/img/detail/9700e65feb7c77115f2ad0407c40bddb.jpg', '抽象立体艺术', null, '2019-08-04 13:42:00', '1', '1', 'pic'), ('3', 'http://localhost:8080/img/detail/77776a17257c63bf8caddaeb23ab4706.jpg', '抽象底纹图片', null, '2019-08-04 13:42:00', '1', '1', 'pic'), ('4', 'http://localhost:8080/img/detail/cca3b0a2965cf42ca13d575a8399aa10.jpg', '黄昏夕阳抽象', null, '2019-08-04 13:42:00', '1', '1', 'pic'), ('5', 'http://localhost:8080/img/detail/da21d27121a9cea6191f1c0c50bc0e8c.jpeg', '白色背景里的抽像', null, '2019-08-04 13:42:00', '1', '1', 'pic');
COMMIT;

-- ----------------------------
--  Table structure for `medium_classify`
-- ----------------------------
DROP TABLE IF EXISTS `medium_classify`;
CREATE TABLE `medium_classify` (
  `mediumid` varchar(50) DEFAULT NULL COMMENT 'image的id',
  `classifyid` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `medium_classify`
-- ----------------------------
BEGIN;
INSERT INTO `medium_classify` VALUES ('2', '1'), ('3', '1'), ('4', '1'), ('5', '1');
COMMIT;

-- ----------------------------
--  Table structure for `service`
-- ----------------------------
DROP TABLE IF EXISTS `service`;
CREATE TABLE `service` (
  `serviceid` varchar(50) NOT NULL COMMENT '服务id',
  `servicename` varchar(50) NOT NULL COMMENT '服务名称',
  `image` varchar(100) DEFAULT NULL COMMENT '服务代表图片',
  `servicetype` varchar(10) DEFAULT NULL COMMENT '所属类别',
  `desc` text COMMENT '服务说明',
  `state` int(1) DEFAULT '1' COMMENT '状态，1-启用，0-停用',
  `createtime` varchar(20) NOT NULL COMMENT '创建时间',
  `updatetime` varchar(20) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`serviceid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `service`
-- ----------------------------
BEGIN;
INSERT INTO `service` VALUES ('1', '推送服务', null, null, null, '1', '2019-08-01 17:13:00', null), ('2', '下载服务', null, null, null, '1', '2019-08-03 15:18:00', null), ('3', '推荐服务', null, null, null, '1', '2019-08-03 15:33:00', null);
COMMIT;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `userid` varchar(50) NOT NULL COMMENT '用户表id',
  `username` varchar(50) DEFAULT NULL COMMENT '用户名',
  `useraccount` varchar(50) DEFAULT NULL COMMENT '用户账号',
  `userpwd` varchar(50) NOT NULL COMMENT '密码',
  `note` varchar(255) DEFAULT NULL COMMENT '备注信息',
  `telephone` varchar(15) DEFAULT NULL COMMENT '电话',
  `createtime` varchar(20) DEFAULT NULL COMMENT '创建时间',
  `updatetime` varchar(255) DEFAULT NULL COMMENT '更新时间',
  `userstate` int(1) DEFAULT '1' COMMENT '用户状态，默认为1',
  `image` varchar(100) DEFAULT NULL COMMENT '用户头像图片地址',
  `usertype` varchar(10) DEFAULT NULL COMMENT '用户类别',
  `userlevel` int(5) DEFAULT NULL COMMENT '用户等级',
  PRIMARY KEY (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('48634b2b63fd4de9a87890b4d3431561', 'gyf', null, '3835771286df63b828a25d05651bd08a', null, null, '2019-07-31 19:42:32', '2019-07-31 19:42:32', '1', null, '普通用户', '1'), ('66ce6aedce9c496ab9d36116d082ff8c', 'qq', null, 'e6ba8e62f74140486b9507b6112c6271', null, null, '2019-08-01 17:42:26', '2019-08-01 17:42:26', '1', null, '普通用户', '1'), ('68c8c684f0bb4e01b22ac2cc5d088f28', 'user1', null, 'd6944933069880146d53dc59884f78e7', null, null, '2019-07-31 20:50:12', '2019-07-31 20:50:12', '1', null, '普通用户', '1');
COMMIT;

-- ----------------------------
--  Table structure for `user_classify`
-- ----------------------------
DROP TABLE IF EXISTS `user_classify`;
CREATE TABLE `user_classify` (
  `userid` varchar(50) DEFAULT NULL,
  `classifyid` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `user_log`
-- ----------------------------
DROP TABLE IF EXISTS `user_log`;
CREATE TABLE `user_log` (
  `userid` varchar(50) DEFAULT NULL,
  `mediumid` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `user_service`
-- ----------------------------
DROP TABLE IF EXISTS `user_service`;
CREATE TABLE `user_service` (
  `userid` varchar(50) DEFAULT NULL COMMENT '用户id',
  `serviceid` varchar(50) DEFAULT NULL COMMENT '服务ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

SET FOREIGN_KEY_CHECKS = 1;
